﻿namespace Face8280WebSocketServer.Utility.Model
{
    public class JsonResultModel
    {
        /// <summary>
        /// 结果返回值
        /// </summary>
        public bool result;
        /// <summary>
        /// 正文
        /// </summary>
        public object content;

        /// <summary>
        /// 错误代码
        /// </summary>
        public int errCode;

        /// <summary>
        /// 错误说明
        /// </summary>
        public string error;


        public JsonResultModel():this(null)
        {
        }

        public JsonResultModel(object oContent)
        {
            result = true;
            content = oContent;
            errCode = 0;
            error = null;
        }

        public JsonResultModel(int iErr, string sErrMsg)
        {
            result = false;
            content = null;
            errCode = iErr;
            error = sErrMsg;
        }
    }
}
